home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / H-i586-cygwin32 / i586-cygwin32 / include / mingw32 / setjmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-04  |  1.6 KB  |  70 lines

  1. /* 
  2.  * setjmp.h
  3.  *
  4.  * Declarations supporting setjmp and longjump, a method for avoiding
  5.  * the normal function call return sequence. (Bleah!)
  6.  *
  7.  * This file is part of the Mingw32 package.
  8.  *
  9.  * Contributors:
  10.  *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
  11.  *
  12.  *  THIS SOFTWARE IS NOT COPYRIGHTED
  13.  *
  14.  *  This source code is offered for use in the public domain. You may
  15.  *  use, modify or distribute it freely.
  16.  *
  17.  *  This code is distributed in the hope that it will be useful but
  18.  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  19.  *  DISCLAMED. This includes but is not limited to warranties of
  20.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  21.  *
  22.  * $Revision: 1.3 $
  23.  * $Author: noer $
  24.  * $Date: 1998/10/20 01:24:49 $
  25.  *
  26.  */
  27.  
  28. #ifndef _SETJMP_H_
  29. #define _SETJMP_H_
  30.  
  31. #ifndef RC_INVOKED
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. /*
  38.  * The buffer used by setjmp to store the information used by longjmp
  39.  * to perform it's evil goto-like work. The size of this buffer was
  40.  * determined through experimentation; it's contents are a mystery.
  41.  * NOTE: This was determined on an i386 (actually a Pentium). The
  42.  *       contents could be different on an Alpha or something else.
  43.  */
  44. #define _JBLEN 16
  45. #define _JBTYPE int
  46. typedef _JBTYPE jmp_buf[_JBLEN];
  47.  
  48. /*
  49.  * The function provided by CRTDLL which appears to do the actual work
  50.  * of setjmp.
  51.  */
  52. int    _setjmp (jmp_buf);
  53.  
  54. #define    setjmp(x)    _setjmp(x)
  55.  
  56. /*
  57.  * Return to the last setjmp call and act as if setjmp had returned
  58.  * nVal (which had better be non-zero!).
  59.  */
  60. void    longjmp (jmp_buf, int);
  61.  
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65.  
  66. #endif    /* Not RC_INVOKED */
  67.  
  68. #endif    /* Not _SETJMP_H_ */
  69.  
  70.